<extend name="Base/common"/>
<block name="body">
		<!--我要当老师 资料修改-->
	<!-- <form action="__SELF__" method="post" enctype="multipart/form-data"> -->
		<div id="Beture2">
			<header><a href="javascript:;" class="back" onclick="history.go(-1)"><img src="__IMG__/images/back_03.png"/></a>设置<span class="exit"><a href="__MODULE__/UserMember/logout">退出登录</a></span></header>
			<div class="chose list4">
				<p>用户反馈：</p>
				<div class="textEar" style="display: none;">
					<textarea name="content"></textarea>
				</div>
			</div>
		</div>
	</form>

		<!--修改密码-->
		<div id="CgePasWd">
			<ul>
				<li class="modify">修改密码：</li>
				<li style="display: none;">
						<input type="text" id="password" placeholder="填写原密码"/>
				</li>
				<li style="display: none;">
						<input type="text" id="spassword" placeholder="填写修改的密码"/>
				</li>
			</ul>
		</div>

			<input type="button" class="btn-size" name="" value="确认" />

			<script>
				$('.chose p').click(function(){
					$(this).next('div').toggle(300);
					if($(this).next('div').is(':visible')){
						$('#CgePasWd li:gt(0)').hide();
					}
				});
				$('#CgePasWd .modify').click(function(){
					$(this).nextAll('li').toggle(300);
					if ($(this).next('li').is(':visible')) {
						$('.textEar').hide();
					}
				});
				$('.btn-size').click(function(){
					if ($('.textEar').is(':visible')){
						var val = $('textarea').val();
						$.ajax({
							url: '__CONTROLLER__/add',
							type: 'POST',
							dataType: 'json',
							data: {content: val},
							success:function(data){
								layer.alert(data);
							}
						});
						location.reload();
					}
					if ($('#CgePasWd li:gt(0)').is(':visible')){
						var password = $('#password').val();
						var spassword = $('#spassword').val();
						$.ajax({
							url: "{:U('UserMember/upPwd')}",
							type: 'POST',
							dataType: 'json',
							data: {password: password,spassword:spassword},
							success:function(data){
								var key = data.info;
								layer.alert(key);
								$('#password').val("");
								$('#spassword').val("");
							}
						});
					}
				});
			</script>

</block>